package com.linkage.bss.crm.packagemgr.smo.impl;

import java.util.List;
import java.util.Map;

import com.linkage.bss.commons.dao.Page;
import com.linkage.bss.crm.packagemgr.bmo.IPackageUtilBMO;
import com.linkage.bss.crm.packagemgr.model.Area;
import com.linkage.bss.crm.packagemgr.model.PackParamType;
import com.linkage.bss.crm.packagemgr.smo.IPackageUtilSMO;

/**
 *
 * 包工具
 * @author sgl
 * @date 2013-4-17
 * @version 1.0
 */
public class PackageUtilSMOImpl implements IPackageUtilSMO {

	private IPackageUtilBMO packageUtilBMO;

	public void setPackageUtilBMO(IPackageUtilBMO packageUtilBMO) {
		this.packageUtilBMO = packageUtilBMO;
	}

	public List<Area> getAreaByParentID(Integer areaId) {
		return packageUtilBMO.getAreaByParentID(areaId);
	}

	public List<Map> queryProdSpec(Map map, Page page) {
		return packageUtilBMO.queryProdSpec(map, page);
	}

	public int queryProdSpecCnt(Map map) {

		return packageUtilBMO.queryProdSpecCnt(map);
	}

	/**
	 * 分分页查询产品规格
	 * @param map
	 * @return [参数说明]
	 *
	 * @return List<Map> [返回类型说明]
	 * @exception throws [违例类型] [违例说明]
	 * @see [类、类#方法、类#成员]
	 */
	public List<Map> queryProdSpec(Map map) {
		return packageUtilBMO.queryProdSpec(map);
	}

	/**
	 *
	* queryOfferSpec
	* @Description: 根据销售品名称 查询销售品信息
	*  @param map
	*  @return
	 */
	public int queryOfferSpecCnt(Map map) {
		return packageUtilBMO.queryOfferSpecCnt(map);
	}

	/*
	 *根据销售品名称 查询销售品信息  分页查询
	 */
	public List<Map> queryOfferSpec(Map map, Page page) {
		return packageUtilBMO.queryOfferSpec(map, page);
	}

	public List<PackParamType> queryParamType() {
		return packageUtilBMO.queryParamType();
	}

	/**
	 * 根据包编码查询包的个数
	 *
	 * @return int [返回类型说明]
	 * @exception throws [违例类型] [违例说明]
	 * @see [类、类#方法、类#成员]
	 */
	public int isPackCodeSingle(String packCode) {
		return packageUtilBMO.isPackCodeSingle(packCode);
	}

	/**
	 * 根据销售品ID获得
	 * 销售品的角色名称
	 * @param offerSpecId
	 * @return [参数说明]
	 *
	 * @return List [返回类型说明]
	 * @exception throws [违例类型] [违例说明]
	 * @see [类、类#方法、类#成员]
	 */
	public List queryOfferRoleNameById(Long offerSpecId) {
		return packageUtilBMO.queryOfferRoleNameById(offerSpecId);
	}

	/**
	 * 查询优惠标签
	 */
	@SuppressWarnings("unchecked")
	public List<Map> queryPromoLabel(Map map, Page queryPage) {
		return packageUtilBMO.queryPromoLabel(map, queryPage);
	}

	public int queryPromoLabel(Map map) {
		return packageUtilBMO.queryPromoLabel(map);
	}
}
